package com.oracle.sbdb.scripts;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class FileReader {
	public static List<String[]> readFile(String path) {
		List<String[]> res = new ArrayList<String[]>();
		File file = new File(path);
		
		try {
			FileInputStream is = new FileInputStream(file);
			InputStreamReader isr = new InputStreamReader(is);
			BufferedReader br = new BufferedReader(isr);
			String line = null;
			while ((line = br.readLine()) != null) {
				res.add(line.split(","));
			}
			br.close();
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return res;
	}

}
